package com.example.utils.util;

import java.io.IOException;

/**
 * TODO  自定义的判空方法
 *
 * @ClassName StringNullUtil
 * @Author xiaojiang
 * @Date 2021/9/26 下午 15:19
 */
public class StringNullUtil {

    public static boolean isEmpty(String str) {
        return null == str || "\"\"".equals(str.trim()) || "".equals(str.trim()) || "null".equals(str.trim()) || "NaN".equals(str.trim());
    }

    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }

    public static void main(String[] args) throws IOException {

        String a = "    ";
        System.out.println(StringNullUtil.isEmpty(a));

    }

}
